{extend name="base" /}
{block name="css"}
{css href="__AD_LIBS__/ztree/css/zTreeStyle/zTreeStyle.css" /}
{/block}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <blockquote class="layui-elem-quote layui-text">
            默认显示：<span class="text-danger">用户编号</span>如果用户编号为空时则显示<span class="text-danger">手机号</span>
        </blockquote>
        <div class="ztree" id="authRule"></div>
    </div>
</div>
{/block}
{block name="js"}
{js href="__AD_LIBS__/ztree/js/jquery.ztree.all.min.js" /}
<script>
    $.fn.zTree.init($("#authRule"), {
        view: {
            dblClickExpand: false,
            showLine: true,
            showIcon: false,
            selectedMulti: false
        },
        edit: {
            enable: true,
            editNameSelectAll: true,
            showRemoveBtn: false,
            showRenameBtn: false
        },
        data: {
            simpleData: {
                enable: true
            }
        }
    }, {:json_encode($list)});
</script>
{/block}